<extend name="Public/base" />

<block name="body">
  <div class="main-title">
    <h2>{$meta_title}</h2>
  </div>

  <form action="{:U('update')}" enctype="application/x-www-form-urlencoded" method="POST" class="form-horizontal">
    <div class="form-item">
      <label for="auth-title" class="item-label">发送人 <span class="check-tips">（消息发布人）</span></label>
      <div class="controls">
        <a href="{:U('User/view?id='.$data['id'])}">{$data.uid|get_nickname}</a>
      </div>
    </div>
    <div class="form-item">
      <label for="auth-title" class="item-label">接收人 <span class="check-tips">（消息接收人）</span></label>
      <div class="controls">
        <if condition="$data['to_uid'] eq 0">
          <span class="text-success">全站用户</span>
          <elseif condition="is_numeric($data['to_uid']) eq true"/>
          <a href="{:U('User/view?id='.$data['to_uid'])}" target="_blank">{$data.to_uid|get_nickname}</a>
          <else/>
          指定用户 (<a href="javascript:;">查看</a>)
        </if>
      </div>
    </div>
    <div class="form-item">
      <label for="auth-title" class="item-label">消息标题</label>
      <div class="controls">
        {$data.title}
      </div>
    </div>
    <div class="form-item">
      <label for="auth-title" class="item-label">消息内容</label>
      <div class="controls">
          {$data.content|text2links|nl2br}
      </div>
    </div>
    <div class="form-item">
      <label class="item-label">发送时间</label>
      <div class="controls">
        {$data.create_title|time_format}
      </div>
    </div>
    <div class="form-item">
      <input type="hidden" name="id" value="{$data.id}" />
      <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
    </div>
  </form>
<block>

<block name="script">
  <script language="javascript" type="text/javascript" src="__PUBLIC__/Admin/js/My97Date/WdatePicker.js"></script>
  <script type="text/javascript" charset="utf-8">
    $(function(){
      //导航高亮
      highlight_subnav('{:U('index')}');
      //时间选择
      $('.date_select').focus(function(){
        WdatePicker({skin: 'twoer', dateFmt: 'yyyy-MM-dd'});
      });
    });
  </script>
</block>
